<template>
  <!--产能统计 -->
  <div class="glass_content">
    <div class="glass_serch">
      <el-form class="table_serch">
        <div class="table_serch_labe" style="margin-left: 5px">
          <div class="table_serch_labe_title">机种</div>
          <el-form-item prop="recipe" style="margin-top: -5px">
            <Ariplandown
              :modlulist="modlulist"
              :formInline="formInline"
            ></Ariplandown>
          </el-form-item>
        </div>

        <div class="table_serch_labe" style="margin-left: 13px">
          <div class="table_serch_labe_title">线体</div>
          <Linedrpdown
            :linedroplist="linedroplist"
            @change='onchange'
            :formInline="formInline"
          ></Linedrpdown>
        </div>

        <div class="table_serch_labe" style="margin-left: 13px">
          <div class="table_serch_labe_title">设备</div>
                <el-select
                  v-model="formInline.site"
                  clearable
                  size="mini"
                  style="margin-left: 5px; margin-top: 8px; width: 140px"
                  placeholder="请选择内容"
                >
                  <el-option v-for="(item,index) in this.siteItems" :key="index"
                    :label="item"
                    :value="item"
                  >

                  </el-option>
                </el-select>
          <!-- <Siteandown
            :sitedrwn="sitedrwn"
            :formInline="formInline"
          ></Siteandown> -->
          <!-- <el-form-item label="">
            <el-autocomplete
              size="mini"
              class="product"
              popper-class="my-autocomplete"
              style="margin-left: 10px"
              @input="(e) => (formInline.site = validForbid(e))"
              v-model="formInline.site"
              :fetch-suggestions="querySearch"
              placeholder="请输入内容"
              @select="handleSelect"
            >
              <i
                class="el-icon-edit el-input__icon"
                slot="suffix"
                @click="handleIconClick"
              >
              </i>
              <template slot-scope="{ item }">
                <div class="name">{{ item.value }}</div>
                <span class="addr">{{ item.address }}</span>
              </template>
            </el-autocomplete>
          </el-form-item> -->
        </div>

        <div class="table_serch_labe" style="margin-left: 10px">
          <div class="table_serch_labe_title">站点</div>
          <el-select
            v-model="formInline.step"
            clearable
            size="mini"
            style="margin-left: 5px; margin-top: 8px; width: 140px"
            placeholder="请选择内容"
          >
            <el-option label="MA445" value="MA445"></el-option>
            <el-option label="MA270" value="MA270"></el-option>
          </el-select>
        </div>

        <div class="table_serch_labe" style="margin-left: 13px">
          <div class="table_serch_labe_title">班次</div>
          <el-form-item label="">
            <el-select
              v-model="formInline.class"
              clearable
              size="mini"
              style="margin-left: 5px; margin-top: 0px; width: 140px"
              placeholder="请选择内容"
            >
              <el-option label="白班" value="白班"></el-option>
              <el-option label="夜班" value="夜班"></el-option>
            </el-select>
          </el-form-item>
        </div>

        <div class="table_serch_labe">
          <div class="table_serch_labe_title" style="margin-left: 10px">
            日期
          </div>
          <el-form-item label="" prop="endtime">
            <el-date-picker
              size="mini"
              v-model="formInline.endtime"
              type="date"
              value-format="yyyy-MM-dd"
              placeholder="选择日期"
               :picker-options="pickerOptions0"
              style="width: 130px; margin-left: 9px"
            >
            </el-date-picker>
          </el-form-item>
        </div>

        <div class="table_serch_labe" style="margin-right: 5px">
          <el-button
            type="primary"
            size="mini"
            @click="onSubmit"
            style="height: 30px; margin-top: 6px"
            >查询</el-button
          >
        </div>
      </el-form>
    </div>

    <!-- 切换窗口 -->
    <div class="statis_coent">
      <div class="statis_hader">
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="产能/良率统计" name="first">
            <div class="first_content">
              <!-- 柱状图1 -->
              <div id="first_svg"></div>
              <div style="margin-top: -10px; font-size: 14px">产能统计</div>
              <!-- 表格 产能统计-->
              <el-table
                :data="tablelist.slice(1)"
                border
                size="mini"
                width="100%"
                highlight-current-row
                :row-style="{ height: '10px' }"
                style="font-size: 9px"
                :header-cell-style="headClass"
                :cell-style="rowClass"
              >
                <el-table-column
                  v-for="(item, index) in this.totalData[0]"
                  :key="index"
                  :label="item"
                  :prop="item"
                >
                </el-table-column>
              </el-table>
            </div>
          </el-tab-pane>

          <!-- <el-tab-pane label="点亮统计" name="third"> -->
          <!-- <div class="third_content"> -->
          <!-- 柱状图3 -->
          <!-- <div id="third_mysol"></div> -->
          <!-- 表格 点亮率 -->
          <!-- <div style="margin-top: 20px; font-size: 14px">
                产能点亮率统计
              </div> -->
          <!-- <el-table
                :data="lightUpitems.slice(1)"
                border
                size="small"
                highlight-current-row
                :row-style="{ height: '10px' }"
                style="font-size: 10px; width: 100%"
              >
                <el-table-column
                  v-for="(item, index) in this.lightUptable[0]"
                  :key="index"
                  :label="item"
                  :prop="item"
                >
                </el-table-column>
              </el-table> -->
          <!-- </div> -->
          <!-- </el-tab-pane> -->

          <!-- <el-tab-pane label="良率" name="yield">/ -->
          <!-- <div class="first_content"> -->
          <!-- <div id="yield_bar"></div> -->
          <!-- 表格 产能统计-->
          <!-- <div style="margin-top: 20px; font-size: 14px">产能良率信息</div>
              <el-table
                :data="oklist.slice(1)"
                border
                size="small"
                highlight-current-row
                :row-style="{ height: '10px' }"
                style="font-size: 10px; width: 100%"
              >
                <el-table-column
                  v-for="(item, index) in this.oktable[0]"
                  :key="index"
                  :label="item"
                  :prop="item"
                >
                </el-table-column> -->
          <!-- </el-table> -->
          <!-- </div> -->
          <!-- </el-tab-pane> -->
        </el-tabs>
      </div>
    </div>

    <Popup
      v-show="Popup_show"
      @ClosePopup="ClosePopup"
      @cancelget="cancelget"
      :timer="timer"
    ></Popup>
  </div>
</template>
<script>
// import Siteandown from "../../../components/siteandown/Siteandown";
import Linedrpdown from "../../../components/Linedropdown/Linedropdown";
import Ariplandown from "../../../components/Airplandown/Airplandown";
import axios from "axios";
import Popup from "../../Pop-up/Pop-up";
export default {
  components: {
    Popup,
    Ariplandown,
    Linedrpdown,
    // Siteandown,
  },
  data() {
    return {
      a: 0,
      Popup_show: false,
      network: true, //默认有网
      timer: 0,
      valtimer: "",
      isshow: false,
      activeName: "first",
      formInline: {
        recipe: "",
        order: "",
        line: "",
        step: "",
        site: "",
        endtime: "",
        errorcode: "",
        class: "",
        personid: "",
        type: [],
      },
      restaurants: [],
      totalData: [],
      items: [],
      year: [],

      totalitems: [],
      okitems: [],
      tablelist: [],
      oktable: [],
      oklist: [],
      activationilist: [],
      activationtable: [],
      activaitems: [],
      lightUplist: [],
      lightUptable: [],
      lightUpitems: [],
      TTuplist: [],
      TTuptable: [],
      TTupitems: [],
      xAis: [],
      modlulist: [],
      linedroplist: [],
      sitedrwn: [],
      siteItems:[],
       pickerOptions0: {
          disabledDate(time) {
            return time.getTime() > Date.now() - 8.64e6;//如果没有后面的-8.64e6就是不可以选择今天的
          }
        },  
    };
  },

  created() {
    this.getModelnolist();
  },
  beforeDestroy() {},

  methods: {
  
   onchange(){
     this.siteItems=[]
          this.sitedrwn.forEach((ele)=>{
            if(ele.ID.includes(this.formInline.line)){
              this.siteItems.push(ele.ID)
            }
         })
    },
 

    // 表头样式设置
    headClass() {
      return "text-align: center;background:#696969;color:#fff";
    },

    // 表格样式设置
    rowClass() {
      return "text-align: center;";
    },

    onSubmit() {
      if (this.formInline.recipe == "") {
         this.$message({
                showClose: true,
                message: "机种不能为空",
                type: "warning",
              });
      } else if (this.formInline.endtime == "") {
       this.$message({
                showClose: true,
                message: "日期不能为空",
                type: "warning",
              });
      } else {
        const CancelToken = axios.CancelToken;
        this.ajax({
          url: `prod/1009?&endtime=${this.formInline.endtime}&recipe=${this.formInline.recipe}&line=${this.formInline.line}&site=${this.formInline.site}&class=${this.formInline.class}&order=${this.formInline.order}&step=${this.formInline.step}`,
          method: "GET",
          cancelToken: new CancelToken((c) => {
            this.cancel = c;
          }),
        }).then((res) => {
          var result = res.data;
          console.log(result);
          if (result) {
            this.totalitems = result.bardata.total;
            this.totalData = result.tabledata.total;
            this.okitems = result.bardata.okYield;
            this.oktable = result.tabledata.okYield;
            // this.activationilist = result.bardata.activation;
            // this.activationtable = result.tabledata.activation;
            // this.lightUplist = result.bardata.lightUp;
            // this.lightUptable = result.tabledata.lightUp;
            // this.TTuplist = result.bardata.tt;
            // this.TTuptable = result.tabledata.tt;
            this.xAis = result.tabledata.okYield[0];
            if (this.totalData) {
              this.statisbar();
              this.Tabudataparsing();
            }
          }
        });
      }
    },

    getModelnolist() {
      this.ajax(`func/1023/selProductList`).then((res) => {
        if (res.status == 200) {
          this.modlulist = res.data.product;
          this.linedroplist = res.data.line;
          this.sitedrwn = res.data.eqp;
        }
      });
    },

    ClosePopup() {
      this.Popup_show = false;
      clearInterval(this.Popup_timer);
    },

    //分页数据列表解析方法
    Tabudataparsing() {
      this.tablelist = [];
      var titlelist = this.totalData[0];
      // console.log("------------------------", titlelist);
      var a = titlelist[0];
      var b = titlelist[1];
      var c = titlelist[2];
      var d = titlelist[3];
      var e = titlelist[4];
      var f = titlelist[5];
      var g = titlelist[6];
      var h = titlelist[7];
      var io = titlelist[8];
      var j = titlelist[9];
      var k = titlelist[10];
      var L = titlelist[11];
      var m = titlelist[12];
      var n = titlelist[13];
      var o = titlelist[14];
      var p = titlelist[15];
      var q = titlelist[16];
      var r = titlelist[17];
      var s = titlelist[18];
      var t = titlelist[19];
      var u = titlelist[20];
      var v = titlelist[21];
      var w = titlelist[22];
      var x = titlelist[23];
      var y = titlelist[24];
      var z = titlelist[25];
      if (this.totalData[0].length == 2) {
        for (let i = 1; i < this.totalData.length; i++) {
          var objon = {};
          objon[a] = this.totalData[i][0];
          objon[b] = this.totalData[i][1];
          this.tablelist.push(objon);
        }
      } else if (this.totalData[0].length == 3) {
        for (let i = 1; i < this.totalData.length; i++) {
          var obj0 = {};
          obj0[a] = this.totalData[i][0];
          obj0[b] = this.totalData[i][1];
          obj0[c] = this.totalData[i][2];
          // obj[d] = this.bartable[i][3];
          this.tablelist.push(obj0);
        }
      } else if (this.totalData[0].length == 4) {
        for (let i = 1; i < this.totalData.length; i++) {
          var obj = {};
          obj[a] = this.totalData[i][0];
          obj[b] = this.totalData[i][1];
          obj[c] = this.totalData[i][2];
          obj[d] = this.totalData[i][3];
          this.tablelist.push(obj);
        }
      } else if (this.totalData[0].length == 5) {
        for (let i = 1; i < this.totalData.length; i++) {
          var obj1 = {};
          obj1[a] = this.totalData[i][0];
          obj1[b] = this.totalData[i][1];
          obj1[c] = this.totalData[i][2];
          obj1[d] = this.totalData[i][3];
          obj1[e] = this.totalData[i][4];
          this.tablelist.push(obj1);
        }
      } else if (this.totalData[0].length == 6) {
        for (let i = 1; i < this.totalData.length; i++) {
          var obj2 = {};
          obj2[a] = this.totalData[i][0];
          obj2[b] = this.totalData[i][1];
          obj2[c] = this.totalData[i][2];
          obj2[d] = this.totalData[i][3];
          obj2[e] = this.totalData[i][4];
          obj2[f] = this.totalData[i][5];
          this.tablelist.push(obj2);
        }
      } else if (this.totalData[0].length == 7) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj3 = {};
          obj3[a] = this.totalData[i][0];
          obj3[b] = this.totalData[i][1];
          obj3[c] = this.totalData[i][2];
          obj3[d] = this.totalData[i][3];
          obj3[e] = this.totalData[i][4];
          obj3[f] = this.totalData[i][5];
          obj3[g] = this.totalData[i][6];
          this.tablelist.push(obj3);
        }
      } else if (this.totalData[0].length == 8) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj4 = {};
          obj4[a] = this.totalData[i][0];
          obj4[b] = this.totalData[i][1];
          obj4[c] = this.totalData[i][2];
          obj4[d] = this.totalData[i][3];
          obj4[e] = this.totalData[i][4];
          obj4[f] = this.totalData[i][5];
          obj4[g] = this.totalData[i][6];
          obj4[h] = this.totalData[i][7];
          this.tablelist.push(obj4);
        }
      } else if (this.totalData[0].length == 9) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj5 = {};
          obj5[a] = this.totalData[i][0];
          obj5[b] = this.totalData[i][1];
          obj5[c] = this.totalData[i][2];
          obj5[d] = this.totalData[i][3];
          obj5[e] = this.totalData[i][4];
          obj5[f] = this.totalData[i][5];
          obj5[g] = this.totalData[i][6];
          obj5[h] = this.totalData[i][7];
          obj5[io] = this.totalData[i][8];
          this.tablelist.push(obj5);
        }
      } else if (this.totalData[0].length == 10) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj6 = {};
          obj6[a] = this.totalData[i][0];
          obj6[b] = this.totalData[i][1];
          obj6[c] = this.totalData[i][2];
          obj6[d] = this.totalData[i][3];
          obj6[e] = this.totalData[i][4];
          obj6[f] = this.totalData[i][5];
          obj6[g] = this.totalData[i][6];
          obj6[h] = this.totalData[i][7];
          obj6[io] = this.totalData[i][8];
          obj6[j] = this.totalData[i][9];
          this.tablelist.push(obj6);
        }
      } else if (this.totalData[0].length == 11) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj7 = {};
          obj7[a] = this.totalData[i][0];
          obj7[b] = this.totalData[i][1];
          obj7[c] = this.totalData[i][2];
          obj7[d] = this.totalData[i][3];
          obj7[e] = this.totalData[i][4];
          obj7[f] = this.totalData[i][5];
          obj7[g] = this.totalData[i][6];
          obj7[h] = this.totalData[i][7];
          obj7[io] = this.totalData[i][8];
          obj7[j] = this.totalData[i][9];
          obj7[k] = this.totalData[i][10];
          this.tablelist.push(obj7);
        }
      } else if (this.totalData[0].length == 12) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj8 = {};
          obj8[a] = this.totalData[i][0];
          obj8[b] = this.totalData[i][1];
          obj8[c] = this.totalData[i][2];
          obj8[d] = this.totalData[i][3];
          obj8[e] = this.totalData[i][4];
          obj8[f] = this.totalData[i][5];
          obj8[g] = this.totalData[i][6];
          obj8[h] = this.totalData[i][7];
          obj8[io] = this.totalData[i][8];
          obj8[j] = this.totalData[i][9];
          obj8[k] = this.totalData[i][10];
          obj8[L] = this.totalData[i][11];
          this.tablelist.push(obj8);
        }
      } else if (this.totalData[0].length == 13) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj9 = {};
          obj9[a] = this.totalData[i][0];
          obj9[b] = this.totalData[i][1];
          obj9[c] = this.totalData[i][2];
          obj9[d] = this.totalData[i][3];
          obj9[e] = this.totalData[i][4];
          obj9[f] = this.totalData[i][5];
          obj9[g] = this.totalData[i][6];
          obj9[h] = this.totalData[i][7];
          obj9[io] = this.totalData[i][8];
          obj9[j] = this.totalData[i][9];
          obj9[k] = this.totalData[i][10];
          obj9[L] = this.totalData[i][11];
          obj9[m] = this.totalData[i][12];
          this.tablelist.push(obj9);
        }
      } else if (this.totalData[0].length == 14) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj10 = {};
          obj10[a] = this.totalData[i][0];
          obj10[b] = this.totalData[i][1];
          obj10[c] = this.totalData[i][2];
          obj10[d] = this.totalData[i][3];
          obj10[e] = this.totalData[i][4];
          obj10[f] = this.totalData[i][5];
          obj10[g] = this.totalData[i][6];
          obj10[h] = this.totalData[i][7];
          obj10[io] = this.totalData[i][8];
          obj10[j] = this.totalData[i][9];
          obj10[k] = this.totalData[i][10];
          obj10[L] = this.totalData[i][11];
          obj10[m] = this.totalData[i][12];
          obj10[n] = this.totalData[i][13];
          this.tablelist.push(obj10);
        }
      } else if (this.totalData[0].length == 15) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj11 = {};
          obj11[a] = this.totalData[i][0];
          obj11[b] = this.totalData[i][1];
          obj11[c] = this.totalData[i][2];
          obj11[d] = this.totalData[i][3];
          obj11[e] = this.totalData[i][4];
          obj11[f] = this.totalData[i][5];
          obj11[g] = this.totalData[i][6];
          obj11[h] = this.totalData[i][7];
          obj11[io] = this.totalData[i][8];
          obj11[j] = this.totalData[i][9];
          obj11[k] = this.totalData[i][10];
          obj11[L] = this.totalData[i][11];
          obj11[m] = this.totalData[i][12];
          obj11[n] = this.totalData[i][13];
          obj11[o] = this.totalData[i][14];
          this.tablelist.push(obj11);
        }
      } else if (this.totalData[0].length == 16) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj12 = {};
          obj12[a] = this.totalData[i][0];
          obj12[b] = this.totalData[i][1];
          obj12[c] = this.totalData[i][2];
          obj12[d] = this.totalData[i][3];
          obj12[e] = this.totalData[i][4];
          obj12[f] = this.totalData[i][5];
          obj12[g] = this.totalData[i][6];
          obj12[h] = this.totalData[i][7];
          obj12[io] = this.totalData[i][8];
          obj12[j] = this.totalData[i][9];
          obj12[k] = this.totalData[i][10];
          obj12[L] = this.totalData[i][11];
          obj12[m] = this.totalData[i][12];
          obj12[n] = this.totalData[i][13];
          obj12[o] = this.totalData[i][14];
          obj12[p] = this.totalData[i][15];
          this.tablelist.push(obj12);
        }
      } else if (this.totalData[0].length == 17) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj13 = {};
          obj13[a] = this.totalData[i][0];
          obj13[b] = this.totalData[i][1];
          obj13[c] = this.totalData[i][2];
          obj13[d] = this.totalData[i][3];
          obj13[e] = this.totalData[i][4];
          obj13[f] = this.totalData[i][5];
          obj13[g] = this.totalData[i][6];
          obj13[h] = this.totalData[i][7];
          obj13[io] = this.totalData[i][8];
          obj13[j] = this.totalData[i][9];
          obj13[k] = this.totalData[i][10];
          obj13[L] = this.totalData[i][11];
          obj13[m] = this.totalData[i][12];
          obj13[n] = this.totalData[i][13];
          obj13[o] = this.totalData[i][14];
          obj13[p] = this.totalData[i][15];
          obj13[q] = this.totalData[i][16];
          this.tablelist.push(obj13);
        }
      } else if (this.totalData[0].length == 18) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj14 = {};
          obj14[a] = this.totalData[i][0];
          obj14[b] = this.totalData[i][1];
          obj14[c] = this.totalData[i][2];
          obj14[d] = this.totalData[i][3];
          obj14[e] = this.totalData[i][4];
          obj14[f] = this.totalData[i][5];
          obj14[g] = this.totalData[i][6];
          obj14[h] = this.totalData[i][7];
          obj14[io] = this.totalData[i][8];
          obj14[j] = this.totalData[i][9];
          obj14[k] = this.totalData[i][10];
          obj14[L] = this.totalData[i][11];
          obj14[m] = this.totalData[i][12];
          obj14[n] = this.totalData[i][13];
          obj14[o] = this.totalData[i][14];
          obj14[p] = this.totalData[i][15];
          obj14[q] = this.totalData[i][16];
          obj14[r] = this.totalData[i][17];
          this.tablelist.push(obj14);
          // console.log('===============',this.tablelist)
        }
      } else if (this.totalData[0].length == 19) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj15 = {};
          obj15[a] = this.totalData[i][0];
          obj15[b] = this.totalData[i][1];
          obj15[c] = this.totalData[i][2];
          obj15[d] = this.totalData[i][3];
          obj15[e] = this.totalData[i][4];
          obj15[f] = this.totalData[i][5];
          obj15[g] = this.totalData[i][6];
          obj15[h] = this.totalData[i][7];
          obj15[io] = this.totalData[i][8];
          obj15[j] = this.totalData[i][9];
          obj15[k] = this.totalData[i][10];
          obj15[L] = this.totalData[i][11];
          obj15[m] = this.totalData[i][12];
          obj15[n] = this.totalData[i][13];
          obj15[o] = this.totalData[i][14];
          obj15[p] = this.totalData[i][15];
          obj15[q] = this.totalData[i][16];
          obj15[r] = this.totalData[i][17];
          obj15[s] = this.totalData[i][18];
          this.tablelist.push(obj15);
        }
      } else if (this.totalData[0].length == 20) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj16 = {};
          obj16[a] = this.totalData[i][0];
          obj16[b] = this.totalData[i][1];
          obj16[c] = this.totalData[i][2];
          obj16[d] = this.totalData[i][3];
          obj16[e] = this.totalData[i][4];
          obj16[f] = this.totalData[i][5];
          obj16[g] = this.totalData[i][6];
          obj16[h] = this.totalData[i][7];
          obj16[io] = this.totalData[i][8];
          obj16[j] = this.totalData[i][9];
          obj16[k] = this.totalData[i][10];
          obj16[L] = this.totalData[i][11];
          obj16[m] = this.totalData[i][12];
          obj16[n] = this.totalData[i][13];
          obj16[o] = this.totalData[i][14];
          obj16[p] = this.totalData[i][15];
          obj16[q] = this.totalData[i][16];
          obj16[r] = this.totalData[i][17];
          obj16[s] = this.totalData[i][18];
          obj16[t] = this.totalData[i][19];
          this.tablelist.push(obj16);
        }
      } else if (this.totalData[0].length == 21) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj17 = {};
          obj17[a] = this.totalData[i][0];
          obj17[b] = this.totalData[i][1];
          obj17[c] = this.totalData[i][2];
          obj17[d] = this.totalData[i][3];
          obj17[e] = this.totalData[i][4];
          obj17[f] = this.totalData[i][5];
          obj17[g] = this.totalData[i][6];
          obj17[h] = this.totalData[i][7];
          obj17[io] = this.totalData[i][8];
          obj17[j] = this.totalData[i][9];
          obj17[k] = this.totalData[i][10];
          obj17[L] = this.totalData[i][11];
          obj17[m] = this.totalData[i][12];
          obj17[n] = this.totalData[i][13];
          obj17[o] = this.totalData[i][14];
          obj17[p] = this.totalData[i][15];
          obj17[q] = this.totalData[i][16];
          obj17[r] = this.totalData[i][17];
          obj17[s] = this.totalData[i][18];
          obj17[t] = this.totalData[i][19];
          obj17[u] = this.totalData[i][20];
          this.tablelist.push(obj17);
        }
      } else if (this.totalData[0].length == 22) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj18 = {};
          obj18[a] = this.totalData[i][0];
          obj18[b] = this.totalData[i][1];
          obj18[c] = this.totalData[i][2];
          obj18[d] = this.totalData[i][3];
          obj18[e] = this.totalData[i][4];
          obj18[f] = this.totalData[i][5];
          obj18[g] = this.totalData[i][6];
          obj18[h] = this.totalData[i][7];
          obj18[io] = this.totalData[i][8];
          obj18[j] = this.totalData[i][9];
          obj18[k] = this.totalData[i][10];
          obj18[L] = this.totalData[i][11];
          obj18[m] = this.totalData[i][12];
          obj18[n] = this.totalData[i][13];
          obj18[o] = this.totalData[i][14];
          obj18[p] = this.totalData[i][15];
          obj18[q] = this.totalData[i][16];
          obj18[r] = this.totalData[i][17];
          obj18[s] = this.totalData[i][18];
          obj18[t] = this.totalData[i][19];
          obj18[u] = this.totalData[i][20];
          obj18[v] = this.totalData[i][21];
          this.tablelist.push(obj18);
        }
      } else if (this.totalData[0].length == 23) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj19 = {};
          obj19[a] = this.totalData[i][0];
          obj19[b] = this.totalData[i][1];
          obj19[c] = this.totalData[i][2];
          obj19[d] = this.totalData[i][3];
          obj19[e] = this.totalData[i][4];
          obj19[f] = this.totalData[i][5];
          obj19[g] = this.totalData[i][6];
          obj19[h] = this.totalData[i][7];
          obj19[io] = this.totalData[i][8];
          obj19[j] = this.totalData[i][9];
          obj19[k] = this.totalData[i][10];
          obj19[L] = this.totalData[i][11];
          obj19[m] = this.totalData[i][12];
          obj19[n] = this.totalData[i][13];
          obj19[o] = this.totalData[i][14];
          obj19[p] = this.totalData[i][15];
          obj19[q] = this.totalData[i][16];
          obj19[r] = this.totalData[i][17];
          obj19[s] = this.totalData[i][18];
          obj19[t] = this.totalData[i][19];
          obj19[u] = this.totalData[i][20];
          obj19[v] = this.totalData[i][21];
          obj19[w] = this.totalData[i][22];
          this.tablelist.push(obj19);
        }
      } else if (this.totalData[0].length == 24) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj20 = {};
          obj20[a] = this.totalData[i][0];
          obj20[b] = this.totalData[i][1];
          obj20[c] = this.totalData[i][2];
          obj20[d] = this.totalData[i][3];
          obj20[e] = this.totalData[i][4];
          obj20[f] = this.totalData[i][5];
          obj20[g] = this.totalData[i][6];
          obj20[h] = this.totalData[i][7];
          obj20[io] = this.totalData[i][8];
          obj20[j] = this.totalData[i][9];
          obj20[k] = this.totalData[i][10];
          obj20[L] = this.totalData[i][11];
          obj20[m] = this.totalData[i][12];
          obj20[n] = this.totalData[i][13];
          obj20[o] = this.totalData[i][14];
          obj20[p] = this.totalData[i][15];
          obj20[q] = this.totalData[i][16];
          obj20[r] = this.totalData[i][17];
          obj20[s] = this.totalData[i][18];
          obj20[t] = this.totalData[i][19];
          obj20[u] = this.totalData[i][20];
          obj20[v] = this.totalData[i][21];
          obj20[w] = this.totalData[i][22];
          obj20[x] = this.totalData[i][23];
          this.tablelist.push(obj20);
        }
      } else if (this.totalData[0].length == 25) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj21 = {};
          obj21[a] = this.totalData[i][0];
          obj21[b] = this.totalData[i][1];
          obj21[c] = this.totalData[i][2];
          obj21[d] = this.totalData[i][3];
          obj21[e] = this.totalData[i][4];
          obj21[f] = this.totalData[i][5];
          obj21[g] = this.totalData[i][6];
          obj21[h] = this.totalData[i][7];
          obj21[io] = this.totalData[i][8];
          obj21[j] = this.totalData[i][9];
          obj21[k] = this.totalData[i][10];
          obj21[L] = this.totalData[i][11];
          obj21[m] = this.totalData[i][12];
          obj21[n] = this.totalData[i][13];
          obj21[o] = this.totalData[i][14];
          obj21[p] = this.totalData[i][15];
          obj21[q] = this.totalData[i][16];
          obj21[r] = this.totalData[i][17];
          obj21[s] = this.totalData[i][18];
          obj21[t] = this.totalData[i][19];
          obj21[u] = this.totalData[i][20];
          obj21[v] = this.totalData[i][21];
          obj21[w] = this.totalData[i][22];
          obj21[x] = this.totalData[i][23];
          obj21[y] = this.totalData[i][24];
          this.tablelist.push(obj21);
        }
      } else if (this.totalData[0].length == 26) {
        for (let i = 0; i < this.totalData.length; i++) {
          var obj22 = {};
          obj22[a] = this.totalData[i][0];
          obj22[b] = this.totalData[i][1];
          obj22[c] = this.totalData[i][2];
          obj22[d] = this.totalData[i][3];
          obj22[e] = this.totalData[i][4];
          obj22[f] = this.totalData[i][5];
          obj22[g] = this.totalData[i][6];
          obj22[h] = this.totalData[i][7];
          obj22[io] = this.totalData[i][8];
          obj22[j] = this.totalData[i][9];
          obj22[k] = this.totalData[i][10];
          obj22[L] = this.totalData[i][11];
          obj22[m] = this.totalData[i][12];
          obj22[n] = this.totalData[i][13];
          obj22[o] = this.totalData[i][14];
          obj22[p] = this.totalData[i][15];
          obj22[q] = this.totalData[i][16];
          obj22[r] = this.totalData[i][17];
          obj22[s] = this.totalData[i][18];
          obj22[t] = this.totalData[i][19];
          obj22[u] = this.totalData[i][20];
          obj22[v] = this.totalData[i][21];
          obj22[w] = this.totalData[i][22];
          obj22[x] = this.totalData[i][23];
          obj22[y] = this.totalData[i][24];
          obj22[z] = this.totalData[i][25];
          this.tablelist.push(obj22);
        }
      }
    },

    //良率数据分解
    Tabudataparsingokdata() {
      this.oklist = [];
      var titlelist = this.oktable[0];
      // console.log("------------------------", titlelist);
      var a = titlelist[0];
      var b = titlelist[1];
      var c = titlelist[2];
      var d = titlelist[3];
      var e = titlelist[4];
      var f = titlelist[5];
      var g = titlelist[6];
      var h = titlelist[7];
      var io = titlelist[8];
      var j = titlelist[9];
      var k = titlelist[10];
      var L = titlelist[11];
      var m = titlelist[12];
      var n = titlelist[13];
      var o = titlelist[14];
      var p = titlelist[15];
      var q = titlelist[16];
      var r = titlelist[17];
      var s = titlelist[18];
      if (this.oktable[0].length == 2) {
        for (let i = 1; i < this.oktable.length; i++) {
          var objon = {};
          objon[a] = this.oktable[i][0];
          objon[b] = this.oktable[i][1];
          this.oklist.push(objon);
        }
      } else if (this.oktable[0].length == 3) {
        for (let i = 1; i < this.oktable.length; i++) {
          var obj0 = {};
          obj0[a] = this.oktable[i][0];
          obj0[b] = this.oktable[i][1];
          obj0[c] = this.oktable[i][2];
          // obj[d] = this.bartable[i][3];
          this.oklist.push(obj0);
        }
      } else if (this.oktable[0].length == 4) {
        for (let i = 1; i < this.oktable.length; i++) {
          var obj = {};
          obj[a] = this.oktable[i][0];
          obj[b] = this.oktable[i][1];
          obj[c] = this.oktable[i][2];
          obj[d] = this.oktable[i][3];
          this.oklist.push(obj);
        }
      } else if (this.oktable[0].length == 5) {
        for (let i = 1; i < this.oktable.length; i++) {
          var obj1 = {};
          obj1[a] = this.oktable[i][0];
          obj1[b] = this.oktable[i][1];
          obj1[c] = this.oktable[i][2];
          obj1[d] = this.oktable[i][3];
          obj1[e] = this.oktable[i][4];
          this.oklist.push(obj1);
        }
      } else if (this.oktable[0].length == 6) {
        for (let i = 1; i < this.oktable.length; i++) {
          var obj2 = {};
          obj2[a] = this.oktable[i][0];
          obj2[b] = this.oktable[i][1];
          obj2[c] = this.oktable[i][2];
          obj2[d] = this.oktable[i][3];
          obj2[e] = this.oktable[i][4];
          obj2[f] = this.oktable[i][5];
          this.oklist.push(obj2);
        }
      } else if (this.oktable[0].length == 7) {
        for (let i = 0; i < this.oktable.length; i++) {
          var obj3 = {};
          obj3[a] = this.oktable[i][0];
          obj3[b] = this.oktable[i][1];
          obj3[c] = this.oktable[i][2];
          obj3[d] = this.oktable[i][3];
          obj3[e] = this.oktable[i][4];
          obj3[f] = this.oktable[i][5];
          obj3[g] = this.oktable[i][6];
          this.oklist.push(obj3);
        }
      } else if (this.oktable[0].length == 8) {
        for (let i = 0; i < this.oktable.length; i++) {
          var obj4 = {};
          obj4[a] = this.oktable[i][0];
          obj4[b] = this.oktable[i][1];
          obj4[c] = this.oktable[i][2];
          obj4[d] = this.oktable[i][3];
          obj4[e] = this.oktable[i][4];
          obj4[f] = this.oktable[i][5];
          obj4[g] = this.oktable[i][6];
          obj4[h] = this.oktable[i][7];
          this.oklist.push(obj4);
        }
      } else if (this.oktable[0].length == 9) {
        for (let i = 0; i < this.oktable.length; i++) {
          var obj5 = {};
          obj5[a] = this.oktable[i][0];
          obj5[b] = this.oktable[i][1];
          obj5[c] = this.oktable[i][2];
          obj5[d] = this.oktable[i][3];
          obj5[e] = this.oktable[i][4];
          obj5[f] = this.oktable[i][5];
          obj5[g] = this.oktable[i][6];
          obj5[h] = this.oktable[i][7];
          obj5[io] = this.oktable[i][8];
          this.oklist.push(obj5);
        }
      } else if (this.oktable[0].length == 10) {
        for (let i = 0; i < this.oktable.length; i++) {
          var obj6 = {};
          obj6[a] = this.oktable[i][0];
          obj6[b] = this.oktable[i][1];
          obj6[c] = this.oktable[i][2];
          obj6[d] = this.oktable[i][3];
          obj6[e] = this.oktable[i][4];
          obj6[f] = this.oktable[i][5];
          obj6[g] = this.oktable[i][6];
          obj6[h] = this.oktable[i][7];
          obj6[io] = this.oktable[i][8];
          obj6[j] = this.oktable[i][9];
          this.oklist.push(obj6);
        }
      } else if (this.oktable[0].length == 11) {
        for (let i = 0; i < this.oktable.length; i++) {
          var obj7 = {};
          obj7[a] = this.oktable[i][0];
          obj7[b] = this.oktable[i][1];
          obj7[c] = this.oktable[i][2];
          obj7[d] = this.oktable[i][3];
          obj7[e] = this.oktable[i][4];
          obj7[f] = this.oktable[i][5];
          obj7[g] = this.oktable[i][6];
          obj7[h] = this.oktable[i][7];
          obj7[io] = this.oktable[i][8];
          obj7[j] = this.oktable[i][9];
          obj7[k] = this.oktable[i][10];
          this.oklist.push(obj7);
        }
      } else if (this.oktable[0].length == 12) {
        for (let i = 0; i < this.oktable.length; i++) {
          var obj8 = {};
          obj8[a] = this.oktable[i][0];
          obj8[b] = this.oktable[i][1];
          obj8[c] = this.oktable[i][2];
          obj8[d] = this.oktable[i][3];
          obj8[e] = this.oktable[i][4];
          obj8[f] = this.oktable[i][5];
          obj8[g] = this.oktable[i][6];
          obj8[h] = this.oktable[i][7];
          obj8[io] = this.oktable[i][8];
          obj8[j] = this.oktable[i][9];
          obj8[k] = this.oktable[i][10];
          obj8[L] = this.oktable[i][11];
          this.oklist.push(obj8);
        }
      } else if (this.oktable[0].length == 13) {
        for (let i = 0; i < this.oktable.length; i++) {
          var obj9 = {};
          obj9[a] = this.oktable[i][0];
          obj9[b] = this.oktable[i][1];
          obj9[c] = this.oktable[i][2];
          obj9[d] = this.oktable[i][3];
          obj9[e] = this.oktable[i][4];
          obj9[f] = this.oktable[i][5];
          obj9[g] = this.oktable[i][6];
          obj9[h] = this.oktable[i][7];
          obj9[io] = this.oktable[i][8];
          obj9[j] = this.oktable[i][9];
          obj9[k] = this.oktable[i][10];
          obj9[L] = this.oktable[i][11];
          obj9[m] = this.oktable[i][12];
          this.oklist.push(obj9);
        }
      } else if (this.oktable[0].length == 14) {
        for (let i = 0; i < this.oktable.length; i++) {
          var obj10 = {};
          obj10[a] = this.oktable[i][0];
          obj10[b] = this.oktable[i][1];
          obj10[c] = this.oktable[i][2];
          obj10[d] = this.oktable[i][3];
          obj10[e] = this.oktable[i][4];
          obj10[f] = this.oktable[i][5];
          obj10[g] = this.oktable[i][6];
          obj10[h] = this.oktable[i][7];
          obj10[io] = this.oktable[i][8];
          obj10[j] = this.oktable[i][9];
          obj10[k] = this.oktable[i][10];
          obj10[L] = this.oktable[i][11];
          obj10[m] = this.oktable[i][12];
          obj10[n] = this.oktable[i][13];
          this.oklist.push(obj10);
        }
      } else if (this.oktable[0].length == 15) {
        for (let i = 0; i < this.oktable.length; i++) {
          var obj11 = {};
          obj11[a] = this.oktable[i][0];
          obj11[b] = this.oktable[i][1];
          obj11[c] = this.oktable[i][2];
          obj11[d] = this.oktable[i][3];
          obj11[e] = this.oktable[i][4];
          obj11[f] = this.oktable[i][5];
          obj11[g] = this.oktable[i][6];
          obj11[h] = this.oktable[i][7];
          obj11[io] = this.oktable[i][8];
          obj11[j] = this.oktable[i][9];
          obj11[k] = this.oktable[i][10];
          obj11[L] = this.oktable[i][11];
          obj11[m] = this.oktable[i][12];
          obj11[n] = this.oktable[i][13];
          obj11[o] = this.oktable[i][14];
          this.oklist.push(obj11);
        }
      } else if (this.oktable[0].length == 16) {
        for (let i = 0; i < this.oktable.length; i++) {
          var obj12 = {};
          obj12[a] = this.oktable[i][0];
          obj12[b] = this.oktable[i][1];
          obj12[c] = this.oktable[i][2];
          obj12[d] = this.oktable[i][3];
          obj12[e] = this.oktable[i][4];
          obj12[f] = this.oktable[i][5];
          obj12[g] = this.oktable[i][6];
          obj12[h] = this.oktable[i][7];
          obj12[io] = this.oktable[i][8];
          obj12[j] = this.oktable[i][9];
          obj12[k] = this.oktable[i][10];
          obj12[L] = this.oktable[i][11];
          obj12[m] = this.oktable[i][12];
          obj12[n] = this.oktable[i][13];
          obj12[o] = this.oktable[i][14];
          obj12[p] = this.oktable[i][15];
          this.oklist.push(obj12);
        }
      } else if (this.oktable[0].length == 17) {
        for (let i = 0; i < this.oktable.length; i++) {
          var obj13 = {};
          obj13[a] = this.oktable[i][0];
          obj13[b] = this.oktable[i][1];
          obj13[c] = this.oktable[i][2];
          obj13[d] = this.oktable[i][3];
          obj13[e] = this.oktable[i][4];
          obj13[f] = this.oktable[i][5];
          obj13[g] = this.oktable[i][6];
          obj13[h] = this.oktable[i][7];
          obj13[io] = this.oktable[i][8];
          obj13[j] = this.oktable[i][9];
          obj13[k] = this.oktable[i][10];
          obj13[L] = this.oktable[i][11];
          obj13[m] = this.oktable[i][12];
          obj13[n] = this.oktable[i][13];
          obj13[o] = this.oktable[i][14];
          obj13[p] = this.oktable[i][15];
          obj13[q] = this.oktable[i][16];
          this.oklist.push(obj13);
        }
      } else if (this.oktable[0].length == 18) {
        for (let i = 0; i < this.oktable.length; i++) {
          var obj14 = {};
          obj14[a] = this.oktable[i][0];
          obj14[b] = this.oktable[i][1];
          obj14[c] = this.oktable[i][2];
          obj14[d] = this.oktable[i][3];
          obj14[e] = this.oktable[i][4];
          obj14[f] = this.oktable[i][5];
          obj14[g] = this.oktable[i][6];
          obj14[h] = this.oktable[i][7];
          obj14[io] = this.oktable[i][8];
          obj14[j] = this.oktable[i][9];
          obj14[k] = this.oktable[i][10];
          obj14[L] = this.oktable[i][11];
          obj14[m] = this.oktable[i][12];
          obj14[n] = this.oktable[i][13];
          obj14[o] = this.oktable[i][14];
          obj14[p] = this.oktable[i][15];
          obj14[q] = this.oktable[i][16];
          obj14[r] = this.oktable[i][17];
          this.oklist.push(obj14);
          // console.log("===============", this.oklist);
        }
      } else if (this.oktable[0].length == 19) {
        for (let i = 0; i < this.oktable.length; i++) {
          var obj15 = {};
          obj15[a] = this.oktable[i][0];
          obj15[b] = this.oktable[i][1];
          obj15[c] = this.oktable[i][2];
          obj15[d] = this.oktable[i][3];
          obj15[e] = this.oktable[i][4];
          obj15[f] = this.oktable[i][5];
          obj15[g] = this.oktable[i][6];
          obj15[h] = this.oktable[i][7];
          obj15[io] = this.oktable[i][8];
          obj15[j] = this.oktable[i][9];
          obj15[k] = this.oktable[i][10];
          obj15[L] = this.oktable[i][11];
          obj15[m] = this.oktable[i][12];
          obj15[n] = this.oktable[i][13];
          obj15[o] = this.oktable[i][14];
          obj15[p] = this.oktable[i][15];
          obj15[q] = this.oktable[i][16];
          obj15[r] = this.oktable[i][17];
          obj15[s] = this.oktable[i][18];
          this.oklist.push(obj15);
        }
      }
    },

    //点亮统计
    Tabudatapaactilight() {
      this.lightUpitems = [];
      var titlelist = this.lightUptable[0];
      // console.log("------------------------", titlelist);
      var a = titlelist[0];
      var b = titlelist[1];
      var c = titlelist[2];
      var d = titlelist[3];
      var e = titlelist[4];
      var f = titlelist[5];
      var g = titlelist[6];
      var h = titlelist[7];
      var io = titlelist[8];
      var j = titlelist[9];
      var k = titlelist[10];
      var L = titlelist[11];
      var m = titlelist[12];
      var n = titlelist[13];
      var o = titlelist[14];
      var p = titlelist[15];
      var q = titlelist[16];
      var r = titlelist[17];
      var s = titlelist[18];
      if (this.lightUptable[0].length == 2) {
        for (let i = 1; i < this.lightUptable.length; i++) {
          var objon = {};
          objon[a] = this.lightUptable[i][0];
          objon[b] = this.lightUptable[i][1];
          this.lightUpitems.push(objon);
        }
      } else if (this.lightUptable[0].length == 3) {
        for (let i = 1; i < this.lightUptable.length; i++) {
          var obj0 = {};
          obj0[a] = this.lightUptable[i][0];
          obj0[b] = this.lightUptable[i][1];
          obj0[c] = this.lightUptable[i][2];
          // obj[d] = this.bartable[i][3];
          this.lightUpitems.push(obj0);
        }
      } else if (this.lightUptable[0].length == 4) {
        for (let i = 1; i < this.lightUptable.length; i++) {
          var obj = {};
          obj[a] = this.lightUptable[i][0];
          obj[b] = this.lightUptable[i][1];
          obj[c] = this.lightUptable[i][2];
          obj[d] = this.lightUptable[i][3];
          this.lightUpitems.push(obj);
        }
      } else if (this.lightUptable[0].length == 5) {
        for (let i = 1; i < this.lightUptable.length; i++) {
          var obj1 = {};
          obj1[a] = this.lightUptable[i][0];
          obj1[b] = this.lightUptable[i][1];
          obj1[c] = this.lightUptable[i][2];
          obj1[d] = this.lightUptable[i][3];
          obj1[e] = this.lightUptable[i][4];
          this.lightUpitems.push(obj1);
        }
      } else if (this.lightUptable[0].length == 6) {
        for (let i = 1; i < this.lightUptable.length; i++) {
          var obj2 = {};
          obj2[a] = this.lightUptable[i][0];
          obj2[b] = this.lightUptable[i][1];
          obj2[c] = this.lightUptable[i][2];
          obj2[d] = this.lightUptable[i][3];
          obj2[e] = this.lightUptable[i][4];
          obj2[f] = this.lightUptable[i][5];
          this.lightUpitems.push(obj2);
        }
      } else if (this.lightUptable[0].length == 7) {
        for (let i = 0; i < this.lightUptable.length; i++) {
          var obj3 = {};
          obj3[a] = this.lightUptable[i][0];
          obj3[b] = this.lightUptable[i][1];
          obj3[c] = this.lightUptable[i][2];
          obj3[d] = this.lightUptable[i][3];
          obj3[e] = this.lightUptable[i][4];
          obj3[f] = this.lightUptable[i][5];
          obj3[g] = this.lightUptable[i][6];
          this.lightUpitems.push(obj3);
        }
      } else if (this.lightUptable[0].length == 8) {
        for (let i = 0; i < this.lightUptable.length; i++) {
          var obj4 = {};
          obj4[a] = this.lightUptable[i][0];
          obj4[b] = this.lightUptable[i][1];
          obj4[c] = this.lightUptable[i][2];
          obj4[d] = this.lightUptable[i][3];
          obj4[e] = this.lightUptable[i][4];
          obj4[f] = this.lightUptable[i][5];
          obj4[g] = this.lightUptable[i][6];
          obj4[h] = this.lightUptable[i][7];
          this.lightUpitems.push(obj4);
        }
      } else if (this.lightUptable[0].length == 9) {
        for (let i = 0; i < this.lightUptable.length; i++) {
          var obj5 = {};
          obj5[a] = this.lightUptable[i][0];
          obj5[b] = this.lightUptable[i][1];
          obj5[c] = this.lightUptable[i][2];
          obj5[d] = this.lightUptable[i][3];
          obj5[e] = this.lightUptable[i][4];
          obj5[f] = this.lightUptable[i][5];
          obj5[g] = this.lightUptable[i][6];
          obj5[h] = this.lightUptable[i][7];
          obj5[io] = this.lightUptable[i][8];
          this.lightUpitems.push(obj5);
        }
      } else if (this.lightUptable[0].length == 10) {
        for (let i = 0; i < this.lightUptable.length; i++) {
          var obj6 = {};
          obj6[a] = this.lightUptable[i][0];
          obj6[b] = this.lightUptable[i][1];
          obj6[c] = this.lightUptable[i][2];
          obj6[d] = this.lightUptable[i][3];
          obj6[e] = this.lightUptable[i][4];
          obj6[f] = this.lightUptable[i][5];
          obj6[g] = this.lightUptable[i][6];
          obj6[h] = this.lightUptable[i][7];
          obj6[io] = this.lightUptable[i][8];
          obj6[j] = this.lightUptable[i][9];
          this.lightUpitems.push(obj6);
        }
      } else if (this.lightUptable[0].length == 11) {
        for (let i = 0; i < this.lightUptable.length; i++) {
          var obj7 = {};
          obj7[a] = this.lightUptable[i][0];
          obj7[b] = this.lightUptable[i][1];
          obj7[c] = this.lightUptable[i][2];
          obj7[d] = this.lightUptable[i][3];
          obj7[e] = this.lightUptable[i][4];
          obj7[f] = this.lightUptable[i][5];
          obj7[g] = this.lightUptable[i][6];
          obj7[h] = this.lightUptable[i][7];
          obj7[io] = this.lightUptable[i][8];
          obj7[j] = this.lightUptable[i][9];
          obj7[k] = this.lightUptable[i][10];
          this.lightUpitems.push(obj7);
        }
      } else if (this.lightUptable[0].length == 12) {
        for (let i = 0; i < this.lightUptable.length; i++) {
          var obj8 = {};
          obj8[a] = this.lightUptable[i][0];
          obj8[b] = this.lightUptable[i][1];
          obj8[c] = this.lightUptable[i][2];
          obj8[d] = this.lightUptable[i][3];
          obj8[e] = this.lightUptable[i][4];
          obj8[f] = this.lightUptable[i][5];
          obj8[g] = this.lightUptable[i][6];
          obj8[h] = this.lightUptable[i][7];
          obj8[io] = this.lightUptable[i][8];
          obj8[j] = this.lightUptable[i][9];
          obj8[k] = this.lightUptable[i][10];
          obj8[L] = this.lightUptable[i][11];
          this.lightUpitems.push(obj8);
        }
      } else if (this.lightUptable[0].length == 13) {
        for (let i = 0; i < this.lightUptable.length; i++) {
          var obj9 = {};
          obj9[a] = this.lightUptable[i][0];
          obj9[b] = this.lightUptable[i][1];
          obj9[c] = this.lightUptable[i][2];
          obj9[d] = this.lightUptable[i][3];
          obj9[e] = this.lightUptable[i][4];
          obj9[f] = this.lightUptable[i][5];
          obj9[g] = this.lightUptable[i][6];
          obj9[h] = this.lightUptable[i][7];
          obj9[io] = this.lightUptable[i][8];
          obj9[j] = this.lightUptable[i][9];
          obj9[k] = this.lightUptable[i][10];
          obj9[L] = this.lightUptable[i][11];
          obj9[m] = this.lightUptable[i][12];
          this.lightUpitems.push(obj9);
        }
      } else if (this.lightUptable[0].length == 14) {
        for (let i = 0; i < this.lightUptable.length; i++) {
          var obj10 = {};
          obj10[a] = this.lightUptable[i][0];
          obj10[b] = this.lightUptable[i][1];
          obj10[c] = this.lightUptable[i][2];
          obj10[d] = this.lightUptable[i][3];
          obj10[e] = this.lightUptable[i][4];
          obj10[f] = this.lightUptable[i][5];
          obj10[g] = this.lightUptable[i][6];
          obj10[h] = this.lightUptable[i][7];
          obj10[io] = this.lightUptable[i][8];
          obj10[j] = this.lightUptable[i][9];
          obj10[k] = this.lightUptable[i][10];
          obj10[L] = this.lightUptable[i][11];
          obj10[m] = this.lightUptable[i][12];
          obj10[n] = this.lightUptable[i][13];
          this.lightUpitems.push(obj10);
        }
      } else if (this.lightUptable[0].length == 15) {
        for (let i = 0; i < this.lightUptable.length; i++) {
          var obj11 = {};
          obj11[a] = this.lightUptable[i][0];
          obj11[b] = this.lightUptable[i][1];
          obj11[c] = this.lightUptable[i][2];
          obj11[d] = this.lightUptable[i][3];
          obj11[e] = this.lightUptable[i][4];
          obj11[f] = this.lightUptable[i][5];
          obj11[g] = this.lightUptable[i][6];
          obj11[h] = this.lightUptable[i][7];
          obj11[io] = this.lightUptable[i][8];
          obj11[j] = this.lightUptable[i][9];
          obj11[k] = this.lightUptable[i][10];
          obj11[L] = this.lightUptable[i][11];
          obj11[m] = this.lightUptable[i][12];
          obj11[n] = this.lightUptable[i][13];
          obj11[o] = this.lightUptable[i][14];
          this.lightUpitems.push(obj11);
        }
      } else if (this.lightUptable[0].length == 16) {
        for (let i = 0; i < this.lightUptable.length; i++) {
          var obj12 = {};
          obj12[a] = this.lightUptable[i][0];
          obj12[b] = this.lightUptable[i][1];
          obj12[c] = this.lightUptable[i][2];
          obj12[d] = this.lightUptable[i][3];
          obj12[e] = this.lightUptable[i][4];
          obj12[f] = this.lightUptable[i][5];
          obj12[g] = this.lightUptable[i][6];
          obj12[h] = this.lightUptable[i][7];
          obj12[io] = this.lightUptable[i][8];
          obj12[j] = this.lightUptable[i][9];
          obj12[k] = this.lightUptable[i][10];
          obj12[L] = this.lightUptable[i][11];
          obj12[m] = this.lightUptable[i][12];
          obj12[n] = this.lightUptable[i][13];
          obj12[o] = this.lightUptable[i][14];
          obj12[p] = this.lightUptable[i][15];
          this.lightUpitems.push(obj12);
        }
      } else if (this.lightUptable[0].length == 17) {
        for (let i = 0; i < this.lightUptable.length; i++) {
          var obj13 = {};
          obj13[a] = this.lightUptable[i][0];
          obj13[b] = this.lightUptable[i][1];
          obj13[c] = this.lightUptable[i][2];
          obj13[d] = this.lightUptable[i][3];
          obj13[e] = this.lightUptable[i][4];
          obj13[f] = this.lightUptable[i][5];
          obj13[g] = this.lightUptable[i][6];
          obj13[h] = this.lightUptable[i][7];
          obj13[io] = this.lightUptable[i][8];
          obj13[j] = this.lightUptable[i][9];
          obj13[k] = this.lightUptable[i][10];
          obj13[L] = this.lightUptable[i][11];
          obj13[m] = this.lightUptable[i][12];
          obj13[n] = this.lightUptable[i][13];
          obj13[o] = this.lightUptable[i][14];
          obj13[p] = this.lightUptable[i][15];
          obj13[q] = this.lightUptable[i][16];
          this.lightUpitems.push(obj13);
        }
      } else if (this.lightUptable[0].length == 18) {
        for (let i = 0; i < this.lightUptable.length; i++) {
          var obj14 = {};
          obj14[a] = this.lightUptable[i][0];
          obj14[b] = this.lightUptable[i][1];
          obj14[c] = this.lightUptable[i][2];
          obj14[d] = this.lightUptable[i][3];
          obj14[e] = this.lightUptable[i][4];
          obj14[f] = this.lightUptable[i][5];
          obj14[g] = this.lightUptable[i][6];
          obj14[h] = this.lightUptable[i][7];
          obj14[io] = this.lightUptable[i][8];
          obj14[j] = this.lightUptable[i][9];
          obj14[k] = this.lightUptable[i][10];
          obj14[L] = this.lightUptable[i][11];
          obj14[m] = this.lightUptable[i][12];
          obj14[n] = this.lightUptable[i][13];
          obj14[o] = this.lightUptable[i][14];
          obj14[p] = this.lightUptable[i][15];
          obj14[q] = this.lightUptable[i][16];
          obj14[r] = this.lightUptable[i][17];
          this.lightUpitems.push(obj14);
          // console.log("===============", this.oklist);
        }
      } else if (this.lightUptable[0].length == 19) {
        for (let i = 0; i < this.lightUptable.length; i++) {
          var obj15 = {};
          obj15[a] = this.lightUptable[i][0];
          obj15[b] = this.lightUptable[i][1];
          obj15[c] = this.lightUptable[i][2];
          obj15[d] = this.lightUptable[i][3];
          obj15[e] = this.lightUptable[i][4];
          obj15[f] = this.lightUptable[i][5];
          obj15[g] = this.lightUptable[i][6];
          obj15[h] = this.lightUptable[i][7];
          obj15[io] = this.lightUptable[i][8];
          obj15[j] = this.lightUptable[i][9];
          obj15[k] = this.lightUptable[i][10];
          obj15[L] = this.lightUptable[i][11];
          obj15[m] = this.lightUptable[i][12];
          obj15[n] = this.lightUptable[i][13];
          obj15[o] = this.lightUptable[i][14];
          obj15[p] = this.lightUptable[i][15];
          obj15[q] = this.lightUptable[i][16];
          obj15[r] = this.lightUptable[i][17];
          obj15[s] = this.lightUptable[i][18];
          this.lightUpitems.push(obj15);
        }
      }
    },

    cancelget() {
      // console.log("-----------------------终止请求");
      this.Popup_show = false;
      this.cancel();
      clearInterval(this.Popup_timer);
    },
    
    querySearch(queryString, cb) {
      var restaurants = this.restaurants;
      var results = queryString
        ? restaurants.filter(this.createFilter(queryString))
        : restaurants;
      // 调用 callback 返回建议列表的数据
      cb(results);
    },
    createFilter(queryString) {
      return (restaurant) => {
        return (
          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
          0
        );
      };
    },
    handleSelect(item) {
      console.log(item);
    },
    handleIconClick(ev) {
      console.log(ev);
    },
    handleClick(tab, event) {
      console.log(tab, event);
    },

    //柱状图1
    statisbar() {
      let my_first_svg = this.$echarts.init(
        document.getElementById("first_svg")
      );
      let list = [];
      let keys = [];
      let line = [];
      for (let i = 0; i < this.totalitems.length; i++) {
        list.push(this.totalitems[i].val);
        keys.push(this.totalitems[i].key);
      }
      for (let i = 0; i < this.okitems.length; i++) {
        var num = this.okitems[i].val;
        line.push(num.toFixed(2));
      }
      var ony = line.map(Number);

      var option = {
        title: [
          {
            text: "",
            left: "center",
            textStyle: {
              lineHeight: 56,
              fontSize: 10,
              manginLeft: 5,
            },
          },
          {
            subtext: "纵轴单位(片数)",
            subtextStyle: {
              align: "left",
              lineHeight: 5,
              fontSize: 10,
            },
          },
        ],
        tooltip: {
          trigger: "axis",
          formatter: "{b0}<br />{a0}:{c0}<br />{a1} {c1}%",
          // formatter:function(val){
          //  console.log(val)
          // },
          axisPointer: {
            // 坐标轴指示器，坐标轴触发有效
            type: "shadow", // 默认为直线，可选为：'line' | 'shadow'
          },
        },
        legend: {
          data: ["产能", "良率"],
        },
        grid: {
          left: "2%",
          right: "3%",
          bottom: "3%",
          height: 320,
          containLabel: true,
        },
        xAxis: {
          type: "category",
          show: true,
          axisLabel: {
            interval: 0,
            rotate: 60,
          },
          data: this.xAis,
        },

        yAxis: [
          {
            type: "value",
            // min: 0,
            // max: 100,
          },
          {
            type: "value",
            min: 0,
            max: 100,
            interval: 50,
            axisTick: { show: false },
            axisLine: {
              lineStyle: {
                color: "#000",
              },
            },
            axisLabel: {
              formatter: "{value} %",
            },
          },
        ],
        series: [
          {
            name: "产能",
            type: "bar",

            label: {
              // show: true,
              position: "insideRight",
            },
            data: list,
          },
          {
            name: "良率",
            type: "line",
            // stack: "1",
            data: ony,
            yAxisIndex: 1,
            label: {
              normal: {
                show: true,
                position: "insideRight",

                //  formatter: "{a} <br/>{b}:({c}%)",
                formatter: function (params) {
                  //标签内容
                  return params.value + "%";
                },
              },
            },
          },
        ],
      };

      my_first_svg.setOption(option, true);
      setTimeout(() => {
        window.onresize = function () {
          my_first_svg.resize();
        };
      }, 200);
    },

    thirdbarchart() {
      let thir_barchart = this.$echarts.init(
        document.getElementById("third_mysol")
      );
      let list = [];
      for (let i = 0; i < this.lightUplist.length; i++) {
        list.push(this.lightUplist[i].val);
      }
      thir_barchart.setOption({
        title: [
          {
            text: "",
            left: "left",
            textStyle: {
              lineHeight: 56,
              fontSize: 10,
              manginLeft: 5,
            },
          },
          {
            subtext: "纵轴单位(百分比)",
            subtextStyle: {
              align: "left",
              lineHeight: 56,
              fontSize: 10,
            },
          },
        ],
        tooltip: {
          trigger: "axis",
          formatter: "{b}:{c}%",
          axisPointer: {
            // 坐标轴指示器，坐标轴触发有效
            type: "shadow", // 默认为直线，可选为：'line' | 'shadow'
          },
        },
        legend: {
          data: ["1", "2"],
        },
        grid: {
          left: "2%",
          right: "3%",
          bottom: "3%",
          containLabel: true,
        },
        xAxis: {
          type: "category",
          axisLabel: {
            interval: 0,
            rotate: 60,
          },
          data: this.xAis,
        },
        yAxis: {
          type: "value",
        },
        series: [
          {
            name: "",
            type: "bar",
            stack: "1",
            label: {
              // show: true,
              position: "insideRight",
            },
            data: list,
          },
        ],
      });
    },

    yeidbar() {
      let fourt_barchart = this.$echarts.init(
        document.getElementById("yield_bar")
      );
      let list = [];
      let listdata = [];
      for (let i = 0; i < this.okitems.length; i++) {
        // console.log('222222222222222',this.okitems[i].val)
        list.push(this.okitems[i].val);
      }

      var num;
      for (let i = 0; i < list.length; i++) {
        num = list[i];
        listdata.push(num.toFixed(3));
      }
      var ony = listdata.map(Number);

      fourt_barchart.setOption({
        title: [
          {
            text: "",
            left: "left",
            textStyle: {
              lineHeight: 56,
              fontSize: 10,
              manginLeft: 5,
            },
          },
          {
            subtext: "纵轴单位(百分比),横轴单位(日期)",
            subtextStyle: {
              align: "left",
              lineHeight: 16,
              fontSize: 10,
            },
          },
        ],
        tooltip: {
          trigger: "axis",
          axisPointer: {
            // 坐标轴指示器，坐标轴触发有效
            type: "shadow", // 默认为直线，可选为：'line' | 'shadow'
          },
          formatter: function (data) {
            var result = "";
            for (var i = 0; i < data.length; i++) {
              if (data[i].name == "value") {
                result += data[i].name + ":" + data[i].value + "%" + "<br>";
              } else {
                result += data[i].name + ":" + data[i].value + "%";
              }
            }
            return result;
          },
        },
        legend: {
          data: ["1", "2"],
        },
        grid: {
          left: "2%",
          right: "3%",
          height: 280,
          containLabel: true,
        },
        xAxis: {
          type: "category",
          axisLabel: {
            interval: 0,
            rotate: 60,
          },
          data: this.xAis,
        },
        yAxis: {
          type: "value",
        },
        series: [
          {
            name: "",
            type: "line",
            stack: "1",
            data: ony,
            label: {
              normal: {
                show: false,
                position: "insideRight",
                //  formatter: "{a} <br/>{b}:({c}%)",
                formatter: function (params) {
                  //标签内容
                  return params.value + "%";
                },
              },
            },
          },
        ],
      });
    },
  },
  mounted() {
    // console.log(this.$route.meta.title);
    // this.restaurants = this.loadAll();
  },
};
</script>

<style  scoped>
.glass_content {
  width: 100%;
  background: gainsboro;
}
.glass_serch {
  width: 100%;
  background: #ffffff;
  line-height: 20px;
  box-shadow: 0px 0px 0px 1.5px #c9c8c8;
  border-radius: 5px 5px 5px 5px;
  /* padding:5px; */
}

.statis_coent {
  width: 100%;
  background: #ffffff;
  margin-top: 30px;
  border-radius: 5px 5px 5px 5px;
  box-shadow: 0px 0px 0px 1.5px #c9c8c8;
}
.statis_hader {
  padding: 10px;
}

.table_serch {
  width: 100%;
  min-width: 900px;
  /* background: #ffffff; */
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.table_serch_labe {
  /* border:1px solid #000; */
  height: 40px;
  display: flex;
  margin-left: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
}
.table_serch_labe_title {
  font-size: 11px;
  line-height: 40px;
}
.el-button_eb {
  margin-left: 5px;
  color: #fff;
}
.el-select {
  height: 10px;
  margin-left: -6px;
}
.product {
  width: 130px;
}

.first_content {
  width: 100%;
}
.second_content {
  width: 100%;
}
.third_content {
  width: 100%;
}
.fourth_content {
  width: 100%;
}
#first_svg {
  width: 99%;
  height: 360px;
  margin: 0 auto;
}
#second_mysol {
  width: 1300px;
  height: 360px;
  margin: 0 auto;
}
#third_mysol {
  width: 1300px;
  height: 360px;
  margin: 0 auto;
}
#fourth_mysol {
  width: 1300px;
  height: 360px;
  margin: 0 auto;
}
#yield_bar {
  width: 1300px;
  height: 360px;
  margin: 0 auto;
}
.statis_table {
  width: 100%;
  margin-top: 30px;
  display: flex;
  align-items: center;
  overflow: auto;
}

.table_loding {
  width: 200px;
  height: 100px;
  /* border: 1px solid rgb(68, 186, 236); */
  position: absolute;
  z-index: 999;
  top: 50%;
  left: 40%;
  border-radius: 5px 5px 5px 5px;
  box-shadow: 0px 0px 0px 1px;
}

.table_title {
  color: rgb(101, 91, 91);
  font-size: 20px;
  text-align: center;
  line-height: 60px;
}
.table_timer {
  color: rgb(101, 91, 91);
  font-size: 20px;
  text-align: center;
  line-height: 10px;
}

@media screen and (min-width: 1920px) {
  #first_svg {
    width: 1300px;
    height: 450px;
    margin: 0 auto;
  }

  #second_mysol {
    width: 1300px;
    height: 450px;
    margin: 0 auto;
  }
  #third_mysol {
    width: 1300px;
    height: 450px;
    margin: 0 auto;
  }
  #fourth_mysol {
    width: 1300px;
    height: 450px;
    margin: 0 auto;
  }
  #yield_bar {
    width: 1300px;
    height: 450px;
    margin: 0 auto;
  }
  .statis_coent {
    margin-top: 40px;
    height: 700px;
  }
}
</style>